// pages/perInfo/perInfo.js
const app = getApp()

Component({
  pageLifetimes: {
    show() {
      this.getTabBar().setData({
        selected: 1
      });
    }
  },

  // 初始数据
  data: {
    img_url:"",   //储存头像
    name:""       //储存用户名
  },
  methods:{
    attached: function () {
    },
    // 页面加载函数
    // 捕获数据
    onLoad: function () {
      var that=this;
      that.img_url = app.globalData.userInfo.avatarUrl
      that.name = app.globalData.userInfo.nickName
      this.setData({
        img_url: that.img_url,
        name: that.name
      })
  
    },
    switchNav: function (e){
     console.log(e)
    }
  }
 

})